home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / byte0987.arc / REUSESOF.ARC / SORT.DEF next >
Text File  |  1986-07-15  |  537b  |  18 lines

  1. DEFINITION MODULE Sort;
  2.  
  3.     FROM SortElemType IMPORT ElemType, compare;
  4.  
  5. (* Module SortElemType is used to define the kind of element to be sorted *)
  6.  
  7.     EXPORT QUALIFIED Qsort;
  8.  
  9. PROCEDURE Qsort (VAR A: ARRAY OF ElemType; N: CARDINAL);
  10. (* input:           - array of pointers to elements, and number of elements
  11.  *                [ N <= HIGH(A)+1 ].
  12.  * output:       - the array of pointers is re-arranged so they point to the
  13.  *                elements in sorted order.
  14.  * requires that ElemType has a total order relation named "compare".
  15.  *)
  16.  
  17. END Sort.
  18.